package io.renren.modules.biz.service;

import io.renren.common.utils.PageUtils;
import io.renren.modules.biz.entity.CountDto;
import io.renren.modules.biz.entity.TeamEntity;
import io.renren.modules.biz.entity.TeamTreeDto;

import java.util.Map;

import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.IService;

/**
 * 推广团队表
 *
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2018-09-03 14:51:31
 */
public interface TeamService extends IService<TeamEntity> {

	PageUtils queryPage(Map<String, Object> params);

	/**
	 * 查询伞下会员
	 * 
	 * @param level
	 * @param id
	 * @return
	 */
	PageUtils selectMemberTeam(Map<String, Object> params);

	/**
	 * 统计团队情况
	 * 
	 * @param memberId
	 * @param startDate
	 * @param endDate
	 * @return
	 */
	CountDto countTeam(Long memberId, String startDate, String endDate);

	/**
	 * 根据ID统计当前会员的账务信息
	 * 
	 * @param mobile
	 * @return
	 */
	TeamTreeDto selectAccountingByMemberId(Long memberId, String startDate, String endDate);

	/**
	 * 分页统计伞下会员的账务信息
	 * 
	 * @param page
	 * @param level
	 * @param memberId
	 * @param startDate
	 * @param endDate
	 * @return
	 */
	PageUtils selectAccountingByHigher(Page<TeamTreeDto> page, Integer level, Long memberId, String startDate, String endDate);
}
